<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

	<xsl:template match="treePagesEdit/run">
		
		<xsl:if test="not((root/@id)=0)">
			<div align="right">[<a href="/admin/treePagesEdit/"><b><gt>go to root</gt></b></a>]</div>
			<br/>
		</xsl:if>

		<table class="sqlTable" cellpadding="2">
			<thead><tr>
				<th><gt>Pages</gt></th>
			</tr></thead>
			<tr class="light">
				<td><b>&#160;<xsl:value-of select="root"/></b></td>
				<td width="80" align="center">
					<a href="/admin/treePagesEdit/add/{root/@id}/"><img src="{$imagesURL}run_icon.gif" border="0" align="absmiddle"/></a>
				</td>
			</tr>
			<xsl:for-each select="row">
				<tr class="dark">
					<xsl:if test="position() mod 2 = 0">
						<xsl:attribute name="class">light</xsl:attribute>
					</xsl:if>
					<td><xsl:apply-templates/>&#160;<a href="/admin/treePagesEdit/{@id}/">
						<xsl:if test="@published='no'">
							<xsl:attribute name="style">color:red;</xsl:attribute>
						</xsl:if>
						<xsl:value-of select="@name"/>
					</a></td>
					<td width="80" align="center">
						<a href="/admin/treePagesEdit/add/{@id}/"><img src="{$imagesURL}run_icon.gif" border="0" align="absmiddle"/></a>
						<a href="/admin/treePagesEdit/edit/{@id}/"><img src="{$imagesURL}edit_icon.gif" border="0" align="absmiddle"/></a>
						<a href="/admin/treePagesEdit/delete/{@id}/" onclick="return confirm('[gt]Delete?[/gt]');"><img src="{$imagesURL}delete_icon.gif" border="0" align="absmiddle"/></a>
					</td>
				</tr>
			</xsl:for-each>
		</table>
	</xsl:template>
	
	<xsl:template match="bullet[@type='0']" priority="1">
		<img src="{$imagesURL}0.gif" width="20" height="20" align="absmiddle"/>
	</xsl:template>

	<xsl:template match="bullet[@type='1']" priority="1">
		<img src="{$imagesURL}tree1.gif" width="20" height="20" align="absmiddle"/>
	</xsl:template>

	<xsl:template match="bullet[@type='2']" priority="1">
		<img src="{$imagesURL}tree2.gif" width="20" height="20" align="absmiddle"/>
	</xsl:template>

	<xsl:template match="bullet[@type='3']" priority="1">
		<img src="{$imagesURL}tree3.gif" width="20" height="20" align="absmiddle"/>
	</xsl:template>

</xsl:stylesheet>